#include"at89x52.h"

#define RCLK  P1_5
#define SDATA P1_6
#define SCLK  P1_7

unsigned char where[8]={0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F};

void SendData(unsigned char Xdata,unsigned char Ydata)
{
   unsigned char i=0;
   RCLK=0;
   for(i=0;i<8;i++)
    {
      SDATA=Xdata & 0x01;
      SCLK=1;
      SCLK=0;
      Xdata=Xdata>>1;
    }
    for(i=0;i<8;i++)
    {
      SDATA=Ydata & 0x01;
      SCLK=1;
      SCLK=0;
      Ydata=Ydata>>1;
    }  
       RCLK=1;
}
void Delay ()
{
  unsigned int c;
  for(c=65535;c>0;c--)
  {
  }
}

void main (void)
{
   unsigned int p,i;
   
   while(1)
    { 
	for (i=0;i<8;i++)
	  {
        SendData(where[i],0xFF);
	    Delay();
	  }
    }

}